//
//  BaseBtn.m
//  Financial
//
//  Created by SuperChao.liang on 2016/11/29.
//  Copyright © 2016年 ZYT.com. All rights reserved.
//

#import "BaseBtn.h"

@implementation BaseBtn

//重写该方法后可以让超出父视图范围的子视图响应事件
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
    UIView *view = [super hitTest:point withEvent:event];
    if (view == nil) {
        for (UIView *subView in self.subviews) {
            CGPoint tp = [subView convertPoint:point fromView:self];
            if (CGRectContainsPoint(subView.bounds, tp)) {
                view = subView;
            }
        }
    }
    return view;
}

@end
